﻿function ModuleToggleCollapse(objname) 
{
    var obj = $(objname + '_mid');
    var tip = $(objname + '_collapse');
    if(obj.style.display == '')
    {
        obj.style.display = 'none';
        tip.className = 'module_expand'; 
    }
    else
    {
        obj.style.display = '';
        tip.className = 'module_collapse'; 
        
    }
}




function ModuleToggleCollapse1(objname) 
{
    var obj = $(objname + '_mid');
    var tip = $(objname + '_link');
    if(obj.style.display == '')
    {
        obj.style.display = 'none';
        tip.className = 'expanded'; 
    }
    else
    {
        obj.style.display = '';
        tip.className = 'collapsed'; 
        
    }
}

function CloseOtherMoudle(moduleId)
{
     var array=[];
     array[1]='UserMenu';
     array[2]='PatientMenu';
     array[3]='GroupMenu';
     array[4]='LogMenu';
     array[5]='MessageMenu';
     array[6]='ActionMenu';
     array[7]='FriendMenu';
     array[8]='CommentMenu';
      for(var i=1;i<=8;i++)
      {
        var obj = $(array[i] + '_mid');
        var tip = $(array[i] + '_link');
        if(array[i]!=moduleId)
        {
             if(obj.display=='none')
             {
                obj.display=='';
                tip.className = 'expanded'; 
              }
              else
              {

                    obj.style.display = 'none';
                    tip.className = 'collapsed'; 
              
              }
         } 
       }
       
 }